// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 

package com.brest.managesambafilesharing;

import android.content.Context;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;

// Referenced classes of package com.funkyfresh.samba:
//            FileOps

public class SambaInfo {

	public SambaInfo(Context context1) {
		context = context1;
		preferences = PreferenceManager.getDefaultSharedPreferences(context);
	}

	/*
	 * public static final boolean sambaIsRunning() { int i; boolean flag;
	 * String as[]; int j; i = 0; flag = true; as = (new String[] { "smbd.pid",
	 * "nmbd.pid" }); j = as.length; _L2: String s1; if(i >= j) return flag;
	 * String s = as[i]; s1 = (new
	 * StringBuilder(String.valueOf(BASEDIR))).append
	 * ("var/locks/").append(s).toString(); if(!FileOps.fileExists(s1)) break
	 * MISSING_BLOCK_LABEL_159; boolean flag1; BufferedReader bufferedreader =
	 * new BufferedReader(new FileReader(s1), 16384);
	 * if(!bufferedreader.ready()) throw new IOException(); String s2 =
	 * bufferedreader.readLine(); bufferedreader.close(); if(s2.length() <= 0)
	 * break MISSING_BLOCK_LABEL_168; flag1 = FileOps.fileExists((new
	 * StringBuilder("/proc/")).append(s2).toString()); if(!flag1) flag = false;
	 * break MISSING_BLOCK_LABEL_168; flag = false; break
	 * MISSING_BLOCK_LABEL_168; IOException ioexception; ioexception; flag =
	 * false; i++; if(true) goto _L2; else goto _L1 _L1: }
	 */
	public boolean passwdNotSet() {
		boolean flag = true;
		String s = preferences.getString("password", "");
		if (s != null && s.length() >= 1)
			flag = false;
		return flag;
	}

	public boolean sambaIsEnabled() {
		String s = preferences.getString("sambaenabled", "");
		boolean flag;
		if (s != null && s.equals("YES"))
			flag = true;
		else
			flag = false;
		return flag;
	}

	public static String BASEDIR = "/data/data/com.funkyfresh.samba/files/";
	private Context context;
	private SharedPreferences preferences;

}
